package com.cy.study.config;

import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @version v1.0.0
 * @explain
 * @date 2024/3/18 8:57
 */
@Configuration
@RequiredArgsConstructor
public class TokenConfig implements WebMvcConfigurer {

    private final TokenInterceptor tokenInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(tokenInterceptor)
                        .excludePathPatterns("/**");
//                .excludePathPatterns("/admin/login")
//                .excludePathPatterns("/user/register")
//                .excludePathPatterns("/user/login")
//                .excludePathPatterns("/alipay/notify")
//                .excludePathPatterns("/images/**");
        //先把所有的路径全部放开，等登录做了再把这一块补全


    }





}
